function saveScanQrcodeResult(sn, mid, path, seat_id) {
    wx.setStorageSync('order_seat_sn', sn)
    wx.setStorageSync('merchant_id', mid)
    wx.setStorageSync('qrcode_path', path)
    wx.setStorageSync('seat_id', seat_id)
}
function getScanQrcode() {
    var sn = wx.getStorageSync('order_seat_sn');
    var mid = wx.getStorageSync('merchant_id');
    var path = wx.getStorageSync('qrcode_path');
    var seat_id = wx.getStorageSync('seat_id');
    return {sn: sn, mid: mid, path: path, seat_id: seat_id}
}
function clearScanData() {
    wx.removeStorageSync('qrcode_path')
    wx.removeStorageSync('merchant_id')
    wx.removeStorageSync('order_seat_sn')
    wx.removeStorageSync('seat_id')
}
function setItem(key, value) {
    wx.setStorageSync(key, value)
}

module.exports = {
    saveScanQrcodeResult: saveScanQrcodeResult,
    getScanQrcode: getScanQrcode,
    clearScanData: clearScanData,
    setItem: setItem
}
